Skip to content

fix: keep summary when it contains CVE-ID - #41

Merged
rvagg merged 1 commit into
nodejs:mainfrom
trivikr:keep-summary-with-cve-id
Nov 20, 2026
Merged

rvagg merged 1 commit into
nodejs:mainfrom
trivikr:keep-summary-with-cve-id

Conversation

@trivikr

@trivikr trivikr commented Nov 20, 2026

Copy link
Copy Markdown
Member

The CVE-ID: regex was unanchored (\bCVE-ID:) and ran before the summary branch. A summary line containing CVE-ID:, such as deps: CVE-ID: CVE-2024-1234 fix, set cveId and was never recorded as the summary. The first body line became the summary instead.

The regex is now anchored to the start of the line: /^\s*CVE-ID:\s+(CVE-\d{4}-\d{4,})\b/.

  • Indented CVE-ID: trailers parse as before.
  • Unindented CVE-ID: lines, e.g. from git log --format=%B, still set cveId.
  • CVE-ID: appearing partway through a line no longer sets cveId. The line is parsed as summary or description.

Anchor the CVE-ID regex to the start of the line so a summary such
as "deps: CVE-ID: CVE-2024-1234 fix" is kept as the summary instead
of only setting cveId. Leading whitespace stays optional, so
unindented CVE-ID trailers still match.
@rvagg
rvagg merged commit 59b2bb5 into nodejs:main Nov 20, 2026
7 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 20, 2026
## [3.0.4](v3.0.3...v3.0.4) (2026-11-20)

### Bug Fixes

* keep summary when it contains CVE-ID ([#41](#41)) ([59b2bb5](59b2bb5))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@trivikr
trivikr deleted the keep-summary-with-cve-id branch November 20, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants